const routers = [
    {
        path:'/addBlog',
        name:'addBlog',
        component:()=>import('@/components/AddBlog.vue')
    },{
        path:'*',
        redirect:'/ShowBlogs'
    },
    {
        path:'/showBlogs',
        name:'showBlogs',
        component:()=>import('@/components/ShowBlogs.vue')
    },
    {
        // id后台定义的
        path:'/singleBlog/:id',
        name:'singleBlog',
        component:()=>import('@/components/SingleBlog.vue')
    },
    {
        path: '/editBlog/:id',
        name: 'editBlog',
        component:()=>import('@/components/EditBlog.vue')
    }
]
export default routers